Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual access for grid origins #935

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft

Dual access for grid origins #935

wants to merge 6 commits into from

Conversation

ansoncfit
Copy link
Member

@ansoncfit ansoncfit commented Mar 15, 2024

This is a temporary experimental feature, (ab)using existing features in the UI and backend so that dual access results for grid origins can be obtained without any changes to those other components of our system.

To activate via the UI, add flags: {"gridDualAccess"} to the analysis request JSON. With 10a51a8, regional analyses are hard-coded to produce dual access results. When configuring the regional analysis, enter the desired dual access thresholds in the cutoffs field. Also enter 120 as the maximum cutoff. If you add dualAccessibilityThreshold to the analysis request JSON, it will be used in place of 120.

For example, if you select hospitals, grocery stores, and jobs as destination layers; 5, 10, and 120 as cutoffs; and 10000 as dualAccessibilityThreshold, from the regional results page you will be able to view and download grids showing the travel time required to reach 5 hospitals, 10 grocery stores, and 10k jobs (as well as the other combinations). For now though, the UI selector on the regional analysis result page will be misleadingly labeled (with the "minutes" unit, and with 120 instead of 10000 as the third value).

Thresholds of 1 or 3 might be common, but the UI currently imposes a minimum of 5 minutes.

And return 0 for origins without access (instead of magic number)
unless nonzero task.dualAccessibilityThreshold value is supplied
to be reverted once broker with custom "flags" is deployed
@abyrd
Copy link
Member

abyrd commented Mar 22, 2024

The checks we discussed are in AccessibilityResult#getIntValues, where AccessibilityResult#checkInvariants is called as the first step when the accessibility values are pulled out of the AccessibilityResult into the single point response or RegionalWorkResult. By calling the separate function fakeDualAccess the checks are bypassed.

As a step toward making gridded dual access a first-class feature, we might want separate checkPrimalAccessInvariants and checkDualAccessInvariants methods. The checkDualAccessInvariants method might need to be called at the end of fakeDualAccess after the final return values are prepared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants